﻿@using LearnASPNETCore
@using Microsoft.Extensions.Options
@model LearnASPNETCore.Models.Department

@inject IOptions<LearnASPNETCoreOptions>  options


@*Department模板文件，指定数据的输出格式*@
<tr>

    @if (Model.EmployeeCount > options.Value.BoldDepartmentEmployeeCountThreshold)
    {
        <td><strong>@Model.Name</strong></td>
    }
    else
    {
        <td>@Model.Name</td>
    }


    <td>@Model.Location</td>
    <td>@Model.EmployeeCount</td>

    <td>
        <!--列出部门下所有的员工-->
        <!-- asp-route- 后面跟需要的参数和值-->
        <a asp-controller="Employee" asp-action="Index" asp-route-departmentId="@Model.Id">
            Employees
        </a>
    </td>
</tr>
